package com.edu.coder.xcz.homwork6.t2;

import java.util.Scanner;

public class ComplexTest {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个复数的实部和虚部：");
        Complex complex1 = new Complex(scanner.nextDouble(), scanner.nextDouble());
        System.out.println("complex1" + complex1);
        System.out.println("请输入第二个复数的实部和虚部：");
        Complex complex2 = new Complex(scanner.nextDouble(), scanner.nextDouble());
        System.out.println("complex2" + complex2);
        System.out.println("complex1+complex2"+complex1.add(complex2));
        System.out.println("complex1-complex2"+complex1.miuns(complex2));
        complex1.equals(complex2);
    }
}
